﻿// Khởi tạo module
var ctrls = angular.module('controllers', []);
// Định nghĩa controller
// IndexCtrl
ctrls.controller('IndexCtrl',
['$scope', '$http', function ($scope, $http) {
    $scope.data = { Code: "Index", Name: "Vega" };
} ]);
// ItemsListCtrl
ctrls.controller('ItemsListCtrl',
['$scope', '$http', function ($scope, $http, $routeParams) {
    $scope.data = { Code: "Items", Name: "Vega" };
} ]);
// ItemsDetailCtrl
ctrls.controller('ItemsDetailCtrl',
['$scope', '$http', '$routeParams', function ($scope, $http, $routeParams) {
    $scope.data = { Code: $routeParams.cd, Name: "Vega" };
} ]);